#!/bin/tcsh

set BuildDir=@CMAKE_LIBRARY_OUTPUT_DIRECTORY@/$BUILD_STYLE
echo $BuildDir

set OSX_App_Name="@target@"
set OSX_App="$BUILT_PRODUCTS_DIR/$OSX_App_Name.app"
set PluginsDir="$OSX_App/Contents/Plugins"


mkdir -p "$PluginsDir"


cd $BuildDir
echo `pwd`
foreach i (*.plug)
	cp $i $OSX_App/Contents/Plugins
end

foreach i (*.dylib)
	cp $i $OSX_App/Contents/Plugins
end
